package common.exception;

import common.model.result.ResultCodeEnum;

/**
 * 业务异常类
 */
public class BusinessException extends RuntimeException {
    
    private ResultCodeEnum resultCode;
    
    public BusinessException(String message) {
        super(message);
        this.resultCode = ResultCodeEnum.FAIL;
    }
    
    public BusinessException(ResultCodeEnum resultCode, String message) {
        super(message);
        this.resultCode = resultCode;
    }
    
    public BusinessException(ResultCodeEnum resultCode) {
        super(resultCode.getMessage());
        this.resultCode = resultCode;
    }
    
    public ResultCodeEnum getResultCode() {
        return resultCode;
    }
} 